/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "5GVnGroupConfiguration.h"

namespace oai::udr::model {

_5GVnGroupConfiguration::_5GVnGroupConfiguration() {
  m_r_5gVnGroupDataIsSet = false;
  m_MembersIsSet = false;
  m_ReferenceId = 0;
  m_ReferenceIdIsSet = false;
  m_AfInstanceId = "";
  m_AfInstanceIdIsSet = false;
  m_InternalGroupIdentifier = "";
  m_InternalGroupIdentifierIsSet = false;
  m_MtcProviderInformation = "";
  m_MtcProviderInformationIsSet = false;
}

_5GVnGroupConfiguration::~_5GVnGroupConfiguration() {}

void _5GVnGroupConfiguration::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const _5GVnGroupConfiguration &o) {
  j = nlohmann::json();
  if (o.r5gVnGroupDataIsSet())
    j["5gVnGroupData"] = o.m_r_5gVnGroupData;
  if (o.membersIsSet() || !o.m_Members.empty())
    j["members"] = o.m_Members;
  if (o.referenceIdIsSet())
    j["referenceId"] = o.m_ReferenceId;
  if (o.afInstanceIdIsSet())
    j["afInstanceId"] = o.m_AfInstanceId;
  if (o.internalGroupIdentifierIsSet())
    j["internalGroupIdentifier"] = o.m_InternalGroupIdentifier;
  if (o.mtcProviderInformationIsSet())
    j["mtcProviderInformation"] = o.m_MtcProviderInformation;
}

void from_json(const nlohmann::json &j, _5GVnGroupConfiguration &o) {
  if (j.find("5gVnGroupData") != j.end()) {
    j.at("5gVnGroupData").get_to(o.m_r_5gVnGroupData);
    o.m_r_5gVnGroupDataIsSet = true;
  }
  if (j.find("members") != j.end()) {
    j.at("members").get_to(o.m_Members);
    o.m_MembersIsSet = true;
  }
  if (j.find("referenceId") != j.end()) {
    j.at("referenceId").get_to(o.m_ReferenceId);
    o.m_ReferenceIdIsSet = true;
  }
  if (j.find("afInstanceId") != j.end()) {
    j.at("afInstanceId").get_to(o.m_AfInstanceId);
    o.m_AfInstanceIdIsSet = true;
  }
  if (j.find("internalGroupIdentifier") != j.end()) {
    j.at("internalGroupIdentifier").get_to(o.m_InternalGroupIdentifier);
    o.m_InternalGroupIdentifierIsSet = true;
  }
  if (j.find("mtcProviderInformation") != j.end()) {
    j.at("mtcProviderInformation").get_to(o.m_MtcProviderInformation);
    o.m_MtcProviderInformationIsSet = true;
  }
}

_5GVnGroupData _5GVnGroupConfiguration::getR5gVnGroupData() const {
  return m_r_5gVnGroupData;
}
void _5GVnGroupConfiguration::setR5gVnGroupData(_5GVnGroupData const &value) {
  m_r_5gVnGroupData = value;
  m_r_5gVnGroupDataIsSet = true;
}
bool _5GVnGroupConfiguration::r5gVnGroupDataIsSet() const {
  return m_r_5gVnGroupDataIsSet;
}
void _5GVnGroupConfiguration::unsetr_5gVnGroupData() {
  m_r_5gVnGroupDataIsSet = false;
}
std::vector<std::string> &_5GVnGroupConfiguration::getMembers() {
  return m_Members;
}
void _5GVnGroupConfiguration::setMembers(
    std::vector<std::string> const &value) {
  m_Members = value;
  m_MembersIsSet = true;
}
bool _5GVnGroupConfiguration::membersIsSet() const { return m_MembersIsSet; }
void _5GVnGroupConfiguration::unsetMembers() { m_MembersIsSet = false; }
int32_t _5GVnGroupConfiguration::getReferenceId() const {
  return m_ReferenceId;
}
void _5GVnGroupConfiguration::setReferenceId(int32_t const value) {
  m_ReferenceId = value;
  m_ReferenceIdIsSet = true;
}
bool _5GVnGroupConfiguration::referenceIdIsSet() const {
  return m_ReferenceIdIsSet;
}
void _5GVnGroupConfiguration::unsetReferenceId() { m_ReferenceIdIsSet = false; }
std::string _5GVnGroupConfiguration::getAfInstanceId() const {
  return m_AfInstanceId;
}
void _5GVnGroupConfiguration::setAfInstanceId(std::string const &value) {
  m_AfInstanceId = value;
  m_AfInstanceIdIsSet = true;
}
bool _5GVnGroupConfiguration::afInstanceIdIsSet() const {
  return m_AfInstanceIdIsSet;
}
void _5GVnGroupConfiguration::unsetAfInstanceId() {
  m_AfInstanceIdIsSet = false;
}
std::string _5GVnGroupConfiguration::getInternalGroupIdentifier() const {
  return m_InternalGroupIdentifier;
}
void _5GVnGroupConfiguration::setInternalGroupIdentifier(
    std::string const &value) {
  m_InternalGroupIdentifier = value;
  m_InternalGroupIdentifierIsSet = true;
}
bool _5GVnGroupConfiguration::internalGroupIdentifierIsSet() const {
  return m_InternalGroupIdentifierIsSet;
}
void _5GVnGroupConfiguration::unsetInternalGroupIdentifier() {
  m_InternalGroupIdentifierIsSet = false;
}
std::string _5GVnGroupConfiguration::getMtcProviderInformation() const {
  return m_MtcProviderInformation;
}
void _5GVnGroupConfiguration::setMtcProviderInformation(
    std::string const &value) {
  m_MtcProviderInformation = value;
  m_MtcProviderInformationIsSet = true;
}
bool _5GVnGroupConfiguration::mtcProviderInformationIsSet() const {
  return m_MtcProviderInformationIsSet;
}
void _5GVnGroupConfiguration::unsetMtcProviderInformation() {
  m_MtcProviderInformationIsSet = false;
}

} // namespace oai::udr::model
